#ifndef __GAME_CREATOR_H
#define __GAME_CREATOR_H

#include "tableschema.h"

class GameCreator
{
public:
    GameCreator( int topicCategory, int topicCount, const QVector<int> & values );
    ~GameCreator();
    bool createGame();
    const QVector<Topic> & topicVector();

private:
    QVector<qint64> randomTopicIdVector( QVector<qint64> & topicIdVector ) const;
    bool createGameTopicVector( const QVector<qint64> & topicIdVector );
    QVector<Question> selectQuestionVectorFollowingValues( const QVector<Question> & questionVector ) const;
    bool findValueInMap( const QMap<qint64, int> & questionValueMap, int value, qint64 & questionId ) const;

private:
    QVector<int> m_values;
    int m_topicCategory;
    int m_topicCount;
    QVector<Topic> m_topicVector;
};

#endif
